<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\facade\Db;
use think\facade\Request;
use think\facade\View;

class Vip
{
    public function vipList()
    {
        $keywords = Request::param('keywords','','过滤方法');
        $where = [];
        if (isset($keywords) && !empty($keywords)){
            $where[] = ['uname','like',"%{$keywords}%"];
        }
        //if (isset(变量) && !empty(变量)){
        //    $where[] = ['字段','表达式',参数];
        //}
        $list = Db::name('user')
            ->where($where)
            ->select();
        View::assign('list',$list);
        return view();
    }








    public function vipAdd()
    {
        return view();
    }

}
